package com.example.springioc.Configuration;

import com.example.springioc.Component.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class UserInfo {
    @Bean
    @Primary
    public User user(){
        return new User("张三");
    }
    @Bean User user2(){
        return new User("李四");
    }
}
